package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:47
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_manage_state")
@ApiModel(value = "SpiderManageStateEntity对象", description = "")
public class SpiderManageStateEntity extends Model<SpiderManageStateEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Integer id;

    @ApiModelProperty("状态码")
    @TableField("state_code")
    private String stateCode;

    @ApiModelProperty("状态名称")
    @TableField("state_name")
    private String stateName;

    @ApiModelProperty("状态信息")
    @TableField("state_message")
    private String stateMessage;

    @ApiModelProperty("状态码目前状态，1：被删除；2：正常使用")
    @TableField("state_status")
    private Integer stateStatus;

    @ApiModelProperty("状态关联任务id")
    @TableField("task_config_id")
    private Long taskConfigId;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
